import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;


public class EasyScript implements Statement{
	Statement coneccion;
	Translation traduccion;
	public EasyScript(Statement con)
	{
		coneccion=con;
	}
	public Resultado ejecutarConsulta(String consulta) throws SQLException
	{
//		Resultado r = coneccion.Seleccion(consulta.toLowerCase());
		traduccion = new Translation(consulta.toLowerCase());
		coneccion.execute(traduccion.getConsulta());
//		ResultSet r = coneccion.executeQuery(traduccion.getConsulta());
//		Resultado result = new Resultado(r, traduccion.getColumnas());
//		System.out.println(t.)
		return null;
	}
//	public void ejecutar(String consulta) {
//		coneccion.ejecutar(consulta.toLowerCase());
//		
//	}
	@Override
	public void addBatch(String arg0) throws SQLException {
		coneccion.addBatch(arg0);
	}
	@Override
	public void cancel() throws SQLException {
		coneccion.cancel();
		
	}
	@Override
	public void clearBatch() throws SQLException {
		coneccion.clearBatch();
	}
	@Override
	public void clearWarnings() throws SQLException {
		coneccion.clearWarnings();
	}
	@Override
	public void close() throws SQLException {
		// TODO Auto-generated method stub
		coneccion.close();
	}
	@Override
	public boolean execute(String arg0) throws SQLException {
		// TODO Auto-generated method stub
		traduccion= new Translation(arg0);
		return coneccion.execute(traduccion.getConsulta());
	}
	@Override
	public boolean execute(String arg0, int arg1) throws SQLException {
		// TODO Auto-generated method stub
		traduccion = new Translation(arg0);
		return coneccion.execute(traduccion.getConsulta(), arg1);
	}
	@Override
	public boolean execute(String arg0, int[] arg1) throws SQLException {
		// TODO Auto-generated method stub
		traduccion = new Translation(arg0);
		return coneccion.execute(traduccion.getConsulta(), arg1);
	}
	@Override
	public boolean execute(String arg0, String[] arg1 ) throws SQLException {
		// TODO Auto-generated method stub
		traduccion = new Translation(arg0);
		return coneccion.execute(traduccion.getConsulta(), arg1);
	}
	@Override
	public int[] executeBatch() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.executeBatch();
	}
	@Override
	public ResultSet executeQuery(String arg0) throws SQLException {
		// TODO Auto-generated method stub
		traduccion = new Translation(arg0);
		return coneccion.executeQuery(traduccion.getConsulta());
//		return null;
	}
	@Override
	public int executeUpdate(String arg0) throws SQLException {
		// TODO Auto-generated method stub
		traduccion = new Translation(arg0);
		return coneccion.executeUpdate(traduccion.getConsulta());
	}
	@Override
	public int executeUpdate(String arg0, int arg1) throws SQLException {
		// TODO Auto-generated method stub
		traduccion = new Translation(arg0);
		return coneccion.executeUpdate(traduccion.getConsulta(), arg1);
	}
	@Override
	public int executeUpdate(String arg0, int[] arg1) throws SQLException {
		// TODO Auto-generated method stub
		traduccion = new Translation(arg0);
		return coneccion.executeUpdate(traduccion.getConsulta(), arg1);
	}
	@Override
	public int executeUpdate(String arg0, String[] arg1) throws SQLException {
		// TODO Auto-generated method stub
		traduccion = new Translation(arg0);
		return coneccion.executeUpdate(traduccion.getConsulta(), arg1);
	}
	@Override
	public Connection getConnection() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getConnection();
	}
	@Override
	public int getFetchDirection() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getFetchDirection();
	}
	@Override
	public int getFetchSize() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getFetchSize();
	}
	@Override
	public ResultSet getGeneratedKeys() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getGeneratedKeys();
	}
	@Override
	public int getMaxFieldSize() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getMaxFieldSize();
	}
	@Override
	public int getMaxRows() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getMaxRows();
	}
	@Override
	public boolean getMoreResults() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getMoreResults();
	}
	@Override
	public boolean getMoreResults(int arg0) throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getMoreResults(arg0);
	}
	@Override
	public int getQueryTimeout() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getQueryTimeout();
	}
	@Override
	public ResultSet getResultSet() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getResultSet();
	}
	@Override
	public int getResultSetConcurrency() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getResultSetConcurrency();
	}
	@Override
	public int getResultSetHoldability() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getResultSetHoldability();
	}
	@Override
	public int getResultSetType() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getResultSetType();
	}
	@Override
	public int getUpdateCount() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getUpdateCount();
	}
	@Override
	public SQLWarning getWarnings() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.getWarnings();
	}
	@Override
	public boolean isClosed() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.isClosed();
	}
	@Override
	public boolean isPoolable() throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.isPoolable();
	}
	@Override
	public void setCursorName(String arg0) throws SQLException {
		// TODO Auto-generated method stub
		coneccion.setCursorName(arg0);
	}
	@Override
	public void setEscapeProcessing(boolean arg0) throws SQLException {
		// TODO Auto-generated method stub
		coneccion.setEscapeProcessing(arg0);
	}
	@Override
	public void setFetchDirection(int arg0) throws SQLException {
		// TODO Auto-generated method stub
		coneccion.setFetchDirection(arg0);
	}
	@Override
	public void setFetchSize(int arg0) throws SQLException {
		// TODO Auto-generated method stub
		coneccion.setFetchSize(arg0);
	}
	@Override
	public void setMaxFieldSize(int arg0) throws SQLException {
		// TODO Auto-generated method stub
		coneccion.setMaxFieldSize(arg0);
	}
	@Override
	public void setMaxRows(int arg0) throws SQLException {
		// TODO Auto-generated method stub
		coneccion.setMaxRows(arg0);
	}
	@Override
	public void setPoolable(boolean arg0) throws SQLException {
		// TODO Auto-generated method stub
		coneccion.setPoolable(arg0);
	}
	@Override
	public void setQueryTimeout(int arg0) throws SQLException {
		// TODO Auto-generated method stub
		coneccion.setQueryTimeout(arg0);
	}
	@Override
	public boolean isWrapperFor(Class<?> arg0) throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.isWrapperFor(arg0);
	}
	@Override
	public <T> T unwrap(Class<T> arg0) throws SQLException {
		// TODO Auto-generated method stub
		return coneccion.unwrap(arg0);
	}
}